//
//  FLNMineTableViewController.m
//  百思不得姐
//
//  Created by xmg on 16/5/28.
//  Copyright © 2016年 FLN.com. All rights reserved.
//

#import "FLNMineTableViewController.h"
#import "UIColor+Hex.h"
#import "FLNSettingTableViewController.h"

@interface FLNMineTableViewController ()

@end

@implementation FLNMineTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = FLNRandomColor;
    
    [self setUpNavBar];

}

- (void)setUpNavBar {
    UIBarButtonItem *night = [UIBarButtonItem barButtonItemWithImage:[UIImage imageNamed:@"mine-moon-icon"] selImage:[UIImage imageNamed:@"mine-moon-icon-click"] target:self action:@selector(night:)];
    UIBarButtonItem *setting = [UIBarButtonItem barButtonItemWithImage:[UIImage imageNamed:@"mine-setting-icon"] highImage:[UIImage imageNamed:@"mine-setting-icon-click"] target:self action:@selector(setting)];

    //right
    self.navigationItem.rightBarButtonItems = @[setting, night];
    
    //titleView
    self.navigationItem.title = @"我的";
}

- (void)night:(UIButton *)btn {
    btn.selected = !btn.selected;

}

- (void)setting {

    //进去设置界面
    FLNSettingTableViewController *settingVc = [[FLNSettingTableViewController alloc] init];
    
    settingVc.hidesBottomBarWhenPushed = YES;
    
    [self.navigationController pushViewController:settingVc animated:YES];
}

@end
